package com.yjt.gcss.gddw.common.dao;

import java.util.ArrayList;
import java.util.Collection;

import org.hibernate.criterion.MatchMode;
import org.hibernate.criterion.Order;
import org.springframework.stereotype.Service;

import com.yjt.common.easyui.datagrid.DataGridDAOImpl;
import com.yjt.common.hibernate.base.DaoException;
import com.yjt.gcss.gddw.common.bean.domain.UiSsds;

@Service(UiSsdsDao.BEAN_PACKAGE_NAME)
public class UiSsdsDao extends DataGridDAOImpl {

	public static final String BEAN_PACKAGE_NAME = "com.yjt.gcss.gddw.common.dao.UiSsdsDao";

	public UiSsdsDao(){

	}

	public UiSsds getBeanById(String id) throws DaoException {
		return (UiSsds) getBeanById(UiSsds.BEAN_PACKAGE_NAME, id, false);
	}
	
	public UiSsds getBeanByIdForUpdate(String id) throws DaoException {
		return (UiSsds) getBeanById(UiSsds.BEAN_PACKAGE_NAME, id, true);
	}

	@SuppressWarnings("rawtypes")
	public Collection getAll() throws DaoException {
		return getAll(UiSsds.BEAN_PACKAGE_NAME);
	}

	@SuppressWarnings("rawtypes")
	public UiSsds getBeanByParams(String hqlName,ArrayList paraList) throws DaoException{
		return (UiSsds) getProtoBeanByParams(hqlName,paraList);
	}

	public UiSsds getBeanByBean(UiSsds bean, MatchMode mode) throws DaoException{
		return (UiSsds) getProtoBeanByBean(bean, mode);
	}
	
	public UiSsdsDao setOrder(Order order){
		return (UiSsdsDao)super.addOrder(order);
	}
}
